USE [CTEM-DB-v1]
GO

/****** Object:  StoredProcedure [dbo].[Employee_Update]    Script Date: 02/10/2012 11:23:09 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		TienDH
-- Create date: 12/05/2011
-- Description:	Get full employee's information
-- =============================================
CREATE PROCEDURE [dbo].[Employee_Update]
	@EmployeeID		BIGINT,
	@Username		VARCHAR(50),
	@Password	    VARCHAR(100),
	@FullName		NVARCHAR(125),
	@Address		NVARCHAR(225),
	@Email			NVARCHAR(100),
	@Note			NVARCHAR(225),
	@RoleID			BIGINT,
	@RightsValue	BIGINT,
	@CMND			VARCHAR(20),	
	@DOB			VARCHAR(50),
	@IsActive		BIT,
	@PhoneNumber	VARCHAR(15),
	@TotalDebt		BIGINT
AS
BEGIN
	UPDATE	[Employee]
	SET		Username = @Username,
			Password = @Password,
			FullName = @FullName,
			Address = @Address,
			Email = @Email,
			Note = @Note,
			RoleID = @RoleID,
			RightsValue = @RightsValue,
			CMND = @CMND,
			DOB = @DOB,
			IsActive = @IsActive,
			PhoneNumber = @PhoneNumber,
			TotalDebt = @TotalDebt
	WHERE	EmployeeID = @EmployeeID
END

GO

